//
//  Defines.h
//  HomeIn
//
//  Created by dllo on 15/11/3.
//  Copyright © 2015年 TZP. All rights reserved.
//

#ifndef Defines_h
#define Defines_h

#ifdef __OBJC__

#import <AFNetworking.h>//AFN
//#import "AFNetworking.h"

#import <MJRefresh.h>//刷新
//#import "MJRefresh.h"

#import <UIImageView+WebCache.h>//异步图片
//#import "UIImageView+WebCache.h"

#import <MBProgressHUD.h>//菊花
//#import "MBProgressHUD.h"

#import <UMSocial.h>//友盟
//#import "UMSocial.h"

#import <SDCycleScrollView.h>//轮播图
//#import "SDCycleScrollView.h"

#import <STKAudioPlayer.h>//音频
#import <STKDataSource.h>
//#import "STKAudioPlayer.h"
//#import "STKDataSource.h"

#import "DataHandle.h"//数据库
#import <QuartzCore/QuartzCore.h>
#import <MediaPlayer/MediaPlayer.h>//视频



#endif

//*******在上面引入Defines.h之后,下面就可以全部放到Defines.h里了

//DEBUG 模式为程序员调试模式, Release是发布模式是面向客户的,因为在Release模式下程序比DEBUG模式更优化,运行熟读更快
#if DEBUG

#define NSLog(FORMAT, ...) fprintf(stderr,"[%s:%d行] %s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);

#else

#define NSLog(FORMAT, ...) nil

#endif



#if DEBUG

#define     HttpBaseURL        @"http://www.test.com/" // 测试服务器

#else

#define     HttpBaseURL        @"http://www.baidu.com/" // 正式服务器

#endif



//判断当前系统版本和手机类型
//#define     iOS8      ([[[ currentDevice] systemVersion] floatValue] >= 8.0) ? YES : NO

//#define     iPHone6                         ([UIScreen mainScreen].bounds.size.height == 667) ? YES : NO
//#define     iOS8                         ([UIScreen mainScreen].bounds.size.height == 667) ? YES : NO




#define     YOUMENGKEY    @"560a349667e58ed9b2003b35" //友盟登录



#define WIDTH [[UIScreen mainScreen] bounds].size.width

#define HEIGHT [[UIScreen mainScreen] bounds].size.height



#define AppDelegateInstance	                        ((AppDelegate*)([UIApplication sharedApplication].delegate))


#define RGBA(R/*红*/, G/*绿*/, B/*蓝*/, A/*透明*/) \
[UIColor colorWithRed:R/255.f green:G/255.f blue:B/255.f alpha:A]

#endif /* Defines_h */
